//
//  main.c
//  mb_test
//
//  Created by avansc on 4/18/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#include <stdio.h>
#include <unistd.h>

#include "../../MBAudio/include/MBAudio.h"

int main (int argc, const char * argv[])
{
    mb_SoundSystem_t *ss = createSoundSystem();
    ss->addSoundBufferFromFile("Bomb.ogg", "/Users/avansc/Desktop/Bomb.ogg"); 
    mb_SoundSource_t snd = ss->addSoundSource("bomb");
    ss->attachBufferToSource("Bomb.ogg", "bomb");
    //ss->playSource("bomb"); or mb_playSource(&snd);
    mb_playSource(&snd);
    
    while(mb_isPlaying(&snd))
    {
        sleep(1);
    }
    
    return 0;
}

